package com.ay277.htqoa.base.entity;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * Created by accp on 2016/12/6.
 */
@MappedSuperclass
public class IDEntity implements Serializable{
    private String id;

    public IDEntity() {
    }

    public IDEntity(String id) {
        this.id = id;
    }

    @Id
    @GenericGenerator(name = "myuuid",strategy = "uuid.hex")
    @GeneratedValue(generator = "myuuid")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
}
